cr_caliphal_chastisement = {
	name = CR_CB_CALIPHAL_CHASTISEMENT
	war_name = CR_WAR_CALIPHAL_CHASTISEMENT
	sprite = 9
	truce_days = 0
	is_permanent = yes
	is_holy_war = yes
	battle_warscore_mult = 1.0
	sort_priority = 4000

	can_use_gui = { always = no }
	can_use = { always = no }

	is_valid = {
		ROOT = { has_character_flag = cr_hajj_crisis }
		FROM = { has_character_flag = cr_caliphal_hajj_legate }
	}

	on_success = { }
	on_fail = { }

	on_reverse_demand = {
		ROOT = {
			cr_hajj_clear_crisis_state_effect = yes
			add_character_modifier = {
				name = cr_abandoned_hajj
				duration = 7300
			}
			piety = -1000
			prestige = -1000
			decadence = 20
			abdicate = { move = no }
		}
	}

	attacker_ai_victory_worth = { factor = -1 }
	attacker_ai_defeat_worth = { factor = 100 }
	defender_ai_victory_worth = { factor = -1 }
	defender_ai_defeat_worth = { factor = 100 }
}
